#include "manipulateString.h"

using namespace std;
void manipulateString(){
string s = "Hello World";
s += ", this is ";
s.append(to_string(2022));
char firstChar = s.at(0);
char lastChar = s.at(s.length() - 1);
cout << firstChar << lastChar << endl;
if (s.find("e") != string::npos) {
    string first = s.substr(0, 5);
    string last = s.substr(7);
    cout << first << last << endl;
}
if (s == "Hello World") {
    cout << "Good job" << endl;
}
s.erase(5, 7);
s.erase(6);
s[5] = '!';
cout << s << endl;
}
